<template>
  <Echarts :options="options" id="leftSecondChart"></Echarts>
</template>

<script>
import Echarts from "@/components/Echarts/index.vue";
import { reactive, watch } from "vue";

export default {
  components: {
    Echarts
  },
  props: {
    chartData: {
      type: Array,
      default: []
    }
  },
  setup(props) {
    let options = reactive({
      series: [
        {
          name: "Nightingale Chart",
          type: "pie",
          radius: [10, "75%"],
          center: ["50%", "50%"],
          roseType: "area",
          itemStyle: {
            borderRadius: 5
          },
          data: props.chartData
        }
      ]
    });
    return {
      options
    };
  }
};
</script>